package com.hengxinguotong.zhihuichengjian.net;

import android.content.Context;

import com.hengxinguotong.zhihuichengjian.BuildConfig;
import com.hengxinguotong.zhihuichengjian.utils.SPUtil;

/**
 * TODO
 *
 * @author hjz
 * @version V1.0.0
 * @since 2018/12/22 10:48
 */

public class HttpRequest extends BaseRequest
{
    private HttpService httpService;

    public HttpRequest(Context context)
    {
        createHttpService(context);
    }

    public void createHttpService(Context context)
    {
        String url = null;
        if (BuildConfig.DEBUG)
        {
            url = SPUtil.getString(context, "SERVER_URL");
        }
        httpService = createRetrofit(url).create(HttpService.class);
    }
}
